﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class SysRefDate : ActiveRecordBase<SysRefDate>
    {
		#region Const Definition
		
		public const string CONST_DateID								= "DateID";
		public const string CONST_RefYear								= "RefYear";
		public const string CONST_RefQuater								= "RefQuater";
		public const string CONST_RefMonth								= "RefMonth";
		public const string CONST_RefDate								= "RefDate";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _dateID;
        
        // Non Key
        private System.Int16 _refYear;
        private System.Byte _refQuater;
        private System.Byte _refMonth;
        private Nullables.NullableDateTime _refDate;

        // Parents
        
        
		

        #endregion

        public SysRefDate() {
               
        }
        public SysRefDate(
            System.Int16 refYear
            ,System.Byte refQuater
            ,System.Byte refMonth
            ,Nullables.NullableDateTime refDate) : this() {
                
            this._refYear = refYear; 
            this._refQuater = refQuater; 
            this._refMonth = refMonth; 
            this._refDate = refDate; 
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_SYSREFDATE_DATEID")]
		#endif
        public System.Int32 DateID {
            get { return this._dateID; }
            set {  this._dateID = value; }
        }
        
        // Non Key
        [Property]
        public System.Int16 RefYear {
            get { return this._refYear; }
			set { this._refYear = value; }
        }
        
        [Property]
        public System.Byte RefQuater {
            get { return this._refQuater; }
			set { this._refQuater = value; }
        }
        
        [Property]
        public System.Byte RefMonth {
            get { return this._refMonth; }
			set { this._refMonth = value; }
        }
        
        [Property]
        public Nullables.NullableDateTime RefDate {
            get { return this._refDate; }
			set { this._refDate = value; }
        }
        
        
        // Parent Relationships
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public SysRefDate Clone()
		{
			SysRefDate newSysRefDate = new SysRefDate();
			
            newSysRefDate.RefYear = this._refYear; 
            newSysRefDate.RefQuater = this._refQuater; 
            newSysRefDate.RefMonth = this._refMonth; 
            newSysRefDate.RefDate = this._refDate; 
			return newSysRefDate;
		}
    }
}



